home *** CD-ROM | disk | FTP | other *** search
/ PC Answers 1995 May / PC Answers CD-ROM 7 (Future Publishing) (May 1995).iso / vbits / code / lang / intro / smileppg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-06  |  2.2 KB  |  78 lines

  1. // smileppg.cpp : Implementation of the CSmilePropPage property page class.
  2.  
  3. #include "stdafx.h"
  4. #include "smile.h"
  5. #include "smileppg.h"
  6.  
  7. #ifdef _DEBUG
  8. #undef THIS_FILE
  9. static char BASED_CODE THIS_FILE[] = __FILE__;
  10. #endif
  11.  
  12.  
  13. IMPLEMENT_DYNCREATE(CSmilePropPage, COlePropertyPage)
  14.  
  15.  
  16. /////////////////////////////////////////////////////////////////////////////
  17. // Message map
  18.  
  19. BEGIN_MESSAGE_MAP(CSmilePropPage, COlePropertyPage)
  20.     //{{AFX_MSG_MAP(CSmilePropPage)
  21.     // NOTE - ClassWizard will add and remove message map entries
  22.     //    DO NOT EDIT what you see in these blocks of generated code !
  23.     //}}AFX_MSG_MAP
  24. END_MESSAGE_MAP()
  25.  
  26.  
  27. /////////////////////////////////////////////////////////////////////////////
  28. // Initialize class factory and guid
  29.  
  30. IMPLEMENT_OLECREATE_EX(CSmilePropPage, "SMILE.SmilePropPage.1",
  31.     0xedec4489, 0xc101, 0x101b, 0xac, 0x9d, 0x0, 0xaa, 0x0, 0x47, 0xd4, 0xfd)
  32.  
  33.  
  34. /////////////////////////////////////////////////////////////////////////////
  35. // CSmilePropPage::CSmilePropPageFactory::UpdateRegistry -
  36. // Adds or removes system registry entries for CSmilePropPage
  37.  
  38. BOOL CSmilePropPage::CSmilePropPageFactory::UpdateRegistry(BOOL bRegister)
  39. {
  40.     if (bRegister)
  41.         return AfxOleRegisterPropertyPageClass(AfxGetInstanceHandle(),
  42.             m_clsid, IDS_SMILE_PPG);
  43.     else
  44.         return AfxOleUnregisterClass(m_clsid, NULL);
  45. }
  46.  
  47.  
  48. /////////////////////////////////////////////////////////////////////////////
  49. // CSmilePropPage::CSmilePropPage - Constructor
  50.  
  51. CSmilePropPage::CSmilePropPage() :
  52.     COlePropertyPage(IDD, IDS_SMILE_PPG_CAPTION)
  53. {
  54.     //{{AFX_DATA_INIT(CSmilePropPage)
  55.     m_caption = _T("");
  56.     m_sad = FALSE;
  57.     //}}AFX_DATA_INIT
  58. }
  59.  
  60.  
  61. /////////////////////////////////////////////////////////////////////////////
  62. // CSmilePropPage::DoDataExchange - Moves data between page and properties
  63.  
  64. void CSmilePropPage::DoDataExchange(CDataExchange* pDX)
  65. {
  66.     //{{AFX_DATA_MAP(CSmilePropPage)
  67.     DDP_Text(pDX, IDC_CAPTION, m_caption, _T("Caption") );
  68.     DDX_Text(pDX, IDC_CAPTION, m_caption);
  69.     DDP_Check(pDX, IDC_SAD, m_sad, _T("Sad") );
  70.     DDX_Check(pDX, IDC_SAD, m_sad);
  71.     //}}AFX_DATA_MAP
  72.     DDP_PostProcessing(pDX);
  73. }
  74.  
  75.  
  76. /////////////////////////////////////////////////////////////////////////////
  77. // CSmilePropPage message handlers
  78.